<style lang="less" scoped>
@import url('./style.less');
.txt {
  color: #3399fe;
}
.code {
  color: #666;
  font-size: 12px;
}
</style>
<template>
  <div class="box">
    <div class="box-title" @click="show=!show">
      <div class="box-title__label">企业资产状况信息</div>
      <div class="box-title__right">
        <!-- <span class="num">{{len||'无'}}</span> -->
        <i :class="cls"></i>
      </div>
    </div>
    <div class="box-content" v-show="show">
      <div class="panel">
        <div class="panel-title">
          <div class="panel-title__label">资产总额</div>
          <div class="panel-title__right">{{dt.TotalAssets || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">所有者权益合计</div>
          <div class="panel-title__right">{{dt.TotalOwnersEquity || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">营业总收入</div>
          <div class="panel-title__right">{{dt.GrossTradingIncome || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">利润总额</div>
          <div class="panel-title__right">{{dt.TotalProfit || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">营业总收入中主营业务</div>
          <div class="panel-title__right">{{dt.MainBusinessIncome || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">净利润</div>
          <div class="panel-title__right">{{dt.NetProfit || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">纳税总额</div>
          <div class="panel-title__right">{{dt.TotalTaxAmount || '-'}}</div>
        </div>
        <div class="panel-title">
          <div class="panel-title__label">负债总额</div>
          <div class="panel-title__right">{{dt.TotalLiabilities || '-'}}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['dt'],
  data() {
    return {
      show: false
    };
  },
  onUnload() {
    this.show = false;
  },
  computed: {
    cls() {
      const arrow = this.show ? 'icon-shangjiantou' : 'icon-tubiaozhizuo-';
      return `iconfont ${arrow}`;
    }
  },
  methods: {
    companyClick(id) {
      this.$router.push({
        path: '/pages/company/main',
        query: {
          unique: id
        }
      });
    }
  }
};
</script>
